
{% init search_placeholder = "搜索或指令" %}
{% init search_action = "/search/search" %}

{% if show_menu %}
<div class="nav">
  <!-- 保持对称 -->
  <div class="menu-box float-left">
    <ul class="nav-ul">
      <li><a class="menu-link" href="/">{{T("笔记")}}</a></li>

      {% if _has_login %}
        <li><a class="menu-link" href="/message?status=created">{{T("Todo")}}</a></li>
        <li><a class="menu-link" href="/plugins_list">{{T("Tool")}}</a></li>
        <li><a class="menu-link" href="/system/index">{{T("Sys")}}</a></li>
      {% end %}
      
      {% if not _has_login %}
        <li><a class="menu-link" class="link" href="/login">{{T("Login")}}</a></li>
      {% end %}

    </ul>
  </div>

  <div class="search-box">
    <form id="searchForm" method="GET" action="{{search_action}}">
      <input id="key" name="key" class="nav-search-input" 
        placeholder="{{search_placeholder}}" 
        value="{{?key}}"/>
      <button class="nav-search-btn btn-default">
        <i class="fa fa-search"></i>
      </button>
      <input class="hide" name="category" value="{{?category}}" />
      {% block search_form %} {% end %}
    </form>
  </div>
</div>

<div class="nav-left">
  <div class="nav-left-inner-box">
    <ul class="navMenu">
      {% if _has_login %}
        <li><a href="/note/books">我的笔记</a></li>
        <li><a href="/note/sticky">我的置顶</a></li>
        <li><a href="/note/recent_edit">最近更新</a></li>
        <li><a href="/note/taglist">标签列表</a></li>
      {% end %}
        <li><a href="/note/public">公开笔记</a></li>
      {% if _has_login %}
        <li><a href="/message?status=created">待办事项</a></li> 
        <li><a href="/note/gallery">我的相册</a></li>
        <li><a href="/note/tools">笔记工具</a></li>
        <li><a href="/plugins_list">工具插件</a></li>
        {% if _is_admin %}
          <li><a href="/fs_list">文件管理</a></li> 
        {% end %}
        <li><a href="/system/index">系统设置</a></li>
      {% end %}

      {% if not _has_login %}
        <li>
          <a href="/login" class="afinve">
            <span>登陆系统</span>
          </a> 
        </li>
      {% end %}
    </ul>
    <div id="poweredBy">
      Powered by <a style="color: #fff; text-decoration: underline;" href="/code/wiki/README.md">Xnote</a>
    </div>
  </div>
</div>

{% end %}
